# -*- coding: utf-8 -*-

from tw import forms
from tw.api import WidgetsList
from tw.forms.validators import UnicodeString, Email, Int

forms.FormField.engine_name = "mako"

class UsuarioToscaForm(forms.TableForm):
    class fields(WidgetsList):
        id = forms.HiddenField(default=0)
        matricula = forms.TextField(label_text = u'Matrícula', validator = UnicodeString(not_empty=True))
        cpf = forms.TextField(label_text = 'CPF', validator = UnicodeString(not_empty=True))
        nome = forms.TextField(validator = UnicodeString(not_empty=True))
        senha = forms.HiddenField(label_text=u'Senha')#, validator = formencode.validators.UnicodeString(not_empty=True))
        data_admissao = forms.CalendarDatePicker(label_text = u'Data de Admissão', date_format='%d/%m/%Y',calendar_lang='pt', button_text="Escolha")
        tipo = forms.SingleSelectField(validator = Int, options=[(1,u'Funcionário'),(2,u'Gerente')])


usuario_form = UsuarioToscaForm("usuario_form")
